<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div id="app">
        <!-- 相当于在下标1的位置加了一个赵六的对象 -->
        <button @click="list.splice( 1, 0, {id:4, name:'赵六'} )">添加</button>
        <ul>
            <li v-for="(item, index) in list" :key="index">
                <input type="checkbox">
                <span>{{ item.name }}</span>
            </li>
        </ul>
    </div>

    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                list: [
                    { id: 1, name: '张三' },
                    { id: 2, name: '李四' },
                    { id: 3, name: '王五' },
                ]
            }
        })
    </script>
</body>

</html>